public class EthernetPort extends GpPort
mClosePort, mHandler, mmBytesAvailable, mPrinterId, mState
构造器和说明 |
---|
EthernetPort(int id,
java.lang.String Ip,
int Port,
Handler handler)
Constructor.
|
限定符和类型 | 方法和说明 |
---|---|
void |
connect()
Start the ConnectThread to initiate a connection to a remote device.
|
void |
connected(java.net.Socket socket,
java.lang.String ip)
Start the ConnectedThread to begin managing a Bluetooth connection
|
void |
stop()
Stop all threads
|
GpCom.ERROR_CODE |
writeDataImmediately(java.util.Vector<java.lang.Byte> data) |
closePortFailed, connectionFailed, connectionLost, connectionToPrinterFailed, getState, invalidPrinter, setState
public EthernetPort(int id, java.lang.String Ip, int Port, Handler handler)
context
- The UI Activity Contexthandler
- A Handler to send messages back to the UI Activitypublic void connect()
device
- The BluetoothDevice to connectpublic void connected(java.net.Socket socket, java.lang.String ip)
socket
- The BluetoothSocket on which the connection was madedevice
- The BluetoothDevice that has been connectedpublic void stop()
public GpCom.ERROR_CODE writeDataImmediately(java.util.Vector<java.lang.Byte> data)